#include <bits/stdc++.h>
#define ll long long
#define endl '\n'

using namespace std;
string s1,s2;

void solve()
{
    cin>>s1>>s2;
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    string ans;
    int minNum = min(s1.size(),s2.size());
    int next = 0,cur = 0;
    for(int i = 0;i<minNum;++i)
    {
        int a = s1[i]-'0';
        int b = s2[i]-'0';
        int prev = next;
        next = (a+b+prev)/10;
        cur = (a+b+prev)%10;
        ans+=(cur+'0');
    }
    string& tmp = (s1.size()>s2.size())?s1:s2;
    for(int i = minNum;i<tmp.size();++i)
    {
        int a = tmp[i]-'0';
        int prev = next;
        next = (a+prev)/10;
        cur = (a+prev)%10;
        ans+=(cur+'0');
    }
    if(next!=0) ans+=(next+'0');
    while(ans.back()=='0') ans.pop_back();
    reverse(ans.begin(),ans.end());
    cout<<ans<<endl;
}

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    solve();
    return 0;
    return 0;
}
